home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-11 | 3.3 KB | 142 lines | [TEXT/MPS ] |
- /**\
- |**| =====================================================================
- |**|
- |**| FILENAME
- |**| TestCubics.h
- |**|
- |**| DESCRIPTION
- |**| This is the include file for the TestCubics Quickdraw GX
- |**| sample program.
- |**|
- |**| COPYRIGHT
- |**| ©1992-1996 Copyright Apple Computer, Inc.
- |**| All rights reserved.
- |**|
- |**| Change History:
- |**|
- |**| 4/96 cnn Replaced obsolete <values.h> with <float.h> and
- |**| <limits.h>. Included <SANE.h>. Updated the header
- |**| filename, description, and copyright. Updated
- |**| #includes to support Universal Interfaces 2.1 and
- |**| changed GX Library names.
- |**|
- |**| =====================================================================
- \**/
-
- //#ifdef MakeDumpFile
-
- #include <Controls.h>
- #include <CursorCtl.h>
- #include <Desk.h>
- #include <Dialogs.h>
- #include <Events.h>
- #include <FixMath.h>
- #include <float.h>
- #include <Fonts.h>
- #include <limits.h>
- #include <Math.h>
- #include <Memory.h>
- #include <Menus.h>
- #include <OSUtils.h>
- #include <Packages.h>
- #include <Palettes.h>
- #include <Picker.h>
- #include <Quickdraw.h>
- #include <Resources.h>
- #include <SANE.h>
- #include <Scrap.h>
- #include <SegLoad.h>
- #include <stdio.h>
- #include <TextEdit.h>
- #include <ToolUtils.h>
- #include <Windows.h>
-
- #include "TestCubicsRef.h"
-
- #define debugging
-
- #include <GXGraphics.h>
- #include <GXEnvironment.h>
- #include <GraphicsLibraries.h>
- #include <GXErrors.h>
- #include <GraphicsStateLibrary.h>
-
-
- #define kSysEnvVers 1
- #define kOsEvent app4Evt
- #define kSusResMes 1
- #define kResMask 1
- #define kMouseMoved 0xFA
- #define extremeNeg -32768
- #define extremePos 32767 - 1
- #define kMinDocSize 64
-
- #define kGrowBHeight 17
- #define kGrowBWidth 17
- #define kCloseEnough 3
- #define kThick 2
-
- enum { kCursInit,
- kCursArrow,
- kCursCross,
- kCursHand,
- kCursWatch
- };
-
-
- #define TopLeft(aRect) (* (Point *) &(aRect).top)
- #define BotRight(aRect) (* (Point *) &(aRect).bottom)
- #define HiWrd(aLong) (((aLong) >> 16) & 0xFFFF)
- #define LoWrd(aLong) ((aLong) & 0xFFFF)
-
- extern void _DataInit();
-
- typedef struct {
- CWindowRecord docWindow;
- gxViewPort vp;
- long count;
- gxPoint **data;
-
- } DocumentRecord, *DocumentPeek;
-
-
- /* prototypes for TestClip.c */
-
- void EventLoop(void);
- void DoEvent(EventRecord *event, short *cursFlag);
- void AdjustCursor(EventRecord *event, short *cursFlag);
- void DoGrowWindow(WindowPtr window, EventRecord *event);
- void DoZoomWindow(WindowPtr window, short part);
- void ResizeWindow(WindowPtr window);
- void DoUpdate(WindowPtr window);
- void DoContentClick(WindowPtr window,EventRecord *event,short *cursFlag);
- short DoCubicDrag( gxPoint *, Point, DocumentPeek );
-
- void SetWorkRect(WindowPtr window, Rect *pinRect, Rect *limitRect);
- void Initialize( void );
- void DrawControlHandle( gxPoint * );
- void DrawCubicNumbers( DocumentPeek );
- void DrawCubicControl( gxShape );
- void DrawWindow(WindowPtr window);
- void DrawCurves( gxPoint **data );
- void DrawMyGrow(WindowPtr window);
- void AdjustMenus( void );
- void DoMenuCommand(long menuResult);
- void DoCloseWindow(WindowPtr window);
- Boolean IsAppWindow(WindowPtr window);
- Boolean IsDAWindow(WindowPtr window);
-
- void ExitApplication( WindowPtr );
- long CountQuadratics( const cubic * );
-
- gxShape NewCubic( const cubic * );
- gxShape NewCubic2( const cubic *, const long );
-
- /******
- #pragma dump ":Objects:DumpFile"
-
- #else
-
- #pragma load ":Objects:DumpFile"
-
- #endif***/